<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>模板返利网－买模板返现金，免费装修，淘宝店铺装修模板免费买</title>
        <link rel="stylesheet" type="text/css" href="/Public/css/default.css" />
        <script type="text/javascript" src="__ROOT__/Public/js/jquery.min.js"></script>
        <script type="text/javascript" src="__ROOT__/Public/js/jquery.form.js"></script>
        <script type="text/javascript" src="__ROOT__/Public/js/operamasks-ui.min.js"></script>
        <script src="http://a.tbcdn.cn/s/kissy/1.1.6/seed-min.js"></script>
        <script src="http://a.tbcdn.cn/apps/pamirsshop/wiki/scripts/wiki.js"></script>
    </head>

    <body onload="bhtml()">
        <div id="edit"></div>
        <div id="meng"></div>
        <div id="tips"></div>
        <div id="hd">
            <div class="logo">
                <h1><embed height="80" width="220" flashvars="bannerWidth=220&bannerHeight=80&bannerSID=http://img1.tbcdn.cn/tfscom/T1ZGRPXsNeXXXgzXjX.xml&bannerXML=&bannerLink=http%3A%2F%2F&dataSource=&bid=35354065&appSource=default" wmode="transparent" allowscriptaccess="always" quality="high" name="35354065" id="35354065" style="" src="http://img.uu1001.cn/bcv3.swf?v=20121219" type="application/x-shockwave-flash"/></embed></h1>
                <p class="top1">
                    售前QQ:1870255432；售后QQ:1870255432&nbsp;&nbsp;<a href="__APP__/Help/index">网站地图</a>&nbsp;&nbsp;<a href="__APP__/Help/index" target="_blank">收藏本站</a>
                </p>
                <p class="top2">
                    您好，欢迎来到模板返利网&nbsp;
                    <?php if(empty($_SESSION['userid'])): ?>[<a href="__APP__/Public/login">登录</a>]&nbsp;&nbsp;[<a href="__APP__/Public/register">免费注册</a>]
                        <?php else: ?>
                        &nbsp;<a href="__APP__/User/orderlist">我的订单</a>&nbsp;&nbsp;<a href="__APP__/User/index">会员中心</a>&nbsp;&nbsp;<a href="__APP__/Public/logout">安全退出</a><?php endif; ?>
                    &nbsp;&nbsp;<a href="__APP__/Help/index">帮助中心</a>
                </p>
            </div>
            <div class="nav">
                <ul class="menu">
                    <li <?php if(($module_name == 'Index') and ($action_name == 'index')): ?>class="curli"<?php endif; ?>><a href="__APP__"><span>首页</span></a></li>
                    <li <?php if($module_name == 'Temp'): ?>class="curli"<?php endif; ?>><a href="__APP__/Temp"><span>所有模板</a></span></li>
                    <li <?php if(($module_name == 'Index') and ($action_name == 'jiaocheng')): ?>class="curli"<?php endif; ?>><a href="__APP__/Index/jiaocheng"><span>返利教程（必读）</a></span></li>
                    <li <?php if(($module_name == 'Index') and ($action_name == 'cooperation')): ?>class="curli"<?php endif; ?>><a href="__APP__/Index/cooperation"><span>商业合作</a></span></li>      
                    <?php if(!empty($_SESSION['userid'])): ?><li <?php if($module_name == 'User'): ?>class="curli"<?php endif; ?>><a href="__APP__/User/index"><span>会员中心</a></span></li><?php endif; ?>
                </ul>
            </div>
        </div>
        <script type="text/javascript">
            function qbot(){
                $("#tips").hide();
                $("body").css({"overflow":"auto"});
            }
            function query(i){
                var f = $('#formwork option:selected').val();
                var t = $('#trade option:selected').val();
                var c = $('#color option:selected').val();
                var s = $('#sty option:selected').val();
                var n = $('#num').val();
                $.get('__URL__/addsty/f/'+f+'/t/'+t+'/c/'+c+'/s/'+s+'/id/'+i+'/n/'+n,function(data){
                    if(data == 1){
                        $("#tips").hide();
                        $("body").css({"overflow":"auto"});
                        var h = window.screen.height;
                        var w = window.screen.width;
                        $("#tips").css({"left":(w/2-100)+"px","top":(h/2-100)+"px","display":"block"});
                        $("#tips").html('<div style="font-size:12px; padding:10px;">修改成功</div>').animate({opacity: 'hide'}, 2000);
                    }
                    if(data == 0){
                        alert("上架后的模板，不允许设置属性为空");
                    }
                });
            }
            function bhtml(){
                var id = '<?php echo ($temp["id"]); ?>';
                $.get("__URL__/qhtml/id/"+id,function(data){
                    $("#ht").html(data);
                });
            }
        </script>

<div id="bd">
    <div class="left1">
        <script type="text/javascript">
	$(document).ready(function(e) {
        $(".userMenu li").mouseover(function(){
			$(this).css("background-color","#FFFAE2");
			});
		 $(".userMenu li").mouseleave(function(){
			$(this).css("background-color","#fff");
			});	
    });
</script>
<div class="usercenter">
    <div class="hd"></div>
    <div class="bd">
        <ul class="userMenu">
            <li><a href="__URL__/index">用户概况</a></li>
            <li><a href="__URL__/update">修改资料</a></li>
            <li><a href="__URL__/changepwd">修改密码</a></li>
            <?php if($_SESSION['type']== 1): ?><li><a href="__URL__/temps">我的模板</a></li><?php else: endif; ?>
            <li><a href="__URL__/orderlist">我的订单</a></li>
            <li><a href="__URL__/myorder">已完成订单</a></li>
            <li><a href="__URL__/chongzhi">现金充值</a></li>
            <li><a href="__URL__/tixian">提现申请</a></li>
            <li><a href="__URL__/zdmx">账单明细</a></li>
        </ul>
    </div>
</div>

    </div>
    <div class="templist">
        <form name="searchai" action="__URL__/myorder" method="POST">
                <input type="text" name="key" style="height: 20px;" value="<?php echo ($key); ?>">
                <input type="submit" value="搜索" class="sub" style="width: 68px;height: 24px;border: 1px solid #999;background: #fff;cursor: pointer;">
            </form>
        <div class="list J_TWidget" data-widget-type="Tabs" data-widget-config="{
             'triggerType':'click'
             }">
            <ul class="ks-switchable-nav">
                <?php if($_SESSION['type'] == 2): ?><li class="ks-active">已完成订单</li><?php endif; ?>
                <?php if($_SESSION['type'] == 1): ?><li class="ks-active">已完成订单</li><?php endif; ?>
            </ul>
            
<div class="contents">
    <div class="ks-switchable-content">
        <div class="templist">
            <?php if(!empty($templist1)): ?><form action="" method="post" id="tempsForm">
                    <div class="list-title">
                        <span class="title">模板名</span>
                        <span class="frontpage">缩略图</span>
                        <span class="price">价格</span>
                        <?php if($_SESSION['type'] == 1): ?><span class="count">用户名</span><?php endif; ?>
                        <?php if($_SESSION['type'] == 2): ?><span class="count" style="width:100px;">设计师</span>
                            <?php else: ?><span class="count" style="width:100px;">掌柜</span><?php endif; ?>
                        <span class="rate">返现比例</span>
                        <span class="status" <?php if($_SESSION['type'] == 2): ?>style="width:120px;"<?php endif; ?>>状态</span>
                        <span class="op" style="width:100px;">管理</span>
                    </div>
                    <?php if(is_array($templist1)): foreach($templist1 as $k=>$v): ?><div class="temp-item" style="position: relative;" <?php if($_SESSION['type'] == 1): ?>id="q<?php echo ($v["id"]); ?>"<?php else: ?>id="w<?php echo ($v["id"]); ?>"<?php endif; ?>>
                            <span class="title"><a target="_blank" title="访问模板" href="http://<?php if($na[$k][0][type] == 1): ?>zxn<?php else: ?>zx<?php endif; ?>.taobao.com/detail.htm?id=<?php echo ($na["$k"]["0"]["id"]); ?>"><?php echo ($v["title"]); ?></a></span>
                            <span class="frontpage"><img src="<?php echo ($na["$k"]["0"]["frontpage"]); ?>" width="80" /></span>
                            <span class="price"><?php echo ($na["$k"]["0"]["price"]); ?></span>
                            <?php if($_SESSION['type'] == 1): ?><span class="count" id="zgname"><?php echo ($v["name"]); ?></span><?php endif; ?>
                            <span class="count" style="width:100px;">
                                <?php if($_SESSION['type'] == 2): ?><h4><?php echo ($na["$k"]["0"]["ww"]); ?></h4>
                                    <a href="http://amos.im.alisoft.com/msg.aw?spm=0.0.0.0.UZIR91&amp;v=2&amp;uid=<?php echo ($na["$k"]["0"]["ww"]); ?>&amp;s=1&amp;site=cntaobao&amp;charset=utf-8" target="_blank" data-spm-anchor-id="0.0.0.0">
                                        <img border="0" alt="" src="http://amos.im.alisoft.com/online.aw?v=2&amp;uid=<?php echo ($na["$k"]["0"]["ww"]); ?>&amp;site=cntaobao&amp;s=1&amp;charset=utf-8">
                                    </a><?php endif; ?>
                                <?php if($_SESSION['type'] == 1): if($v['wwname'] == null): ?>等待用户的添加旺旺<?php else: ?>
                                        <h4><?php echo ($v["wwname"]); ?></h4>
                                        <a href="http://amos.im.alisoft.com/msg.aw?spm=0.0.0.0.UZIR91&amp;v=2&amp;uid=<?php echo ($v["wwname"]); ?>&amp;s=1&amp;site=cntaobao&amp;charset=utf-8" target="_blank" data-spm-anchor-id="0.0.0.0">
                                            <img border="0" alt="" src="http://amos.im.alisoft.com/online.aw?v=2&amp;uid=<?php echo ($v["wwname"]); ?>&amp;site=cntaobao&amp;s=1&amp;charset=utf-8">
                                        </a><?php endif; endif; ?>
                            </span>
                            <span class="rate" ><em id="rate"><?php echo ($na[$k][0]['rate']*100); ?></em>%</span>
                            <?php if($_SESSION['type'] == 2): ?><span class="status" id="qu<?php echo ($v["indent"]); ?>" <?php if($_SESSION['type'] == 2): ?>style="width:120px;color:red;"<?php else: ?>style="color:red;"<?php endif; ?>">
                                    <?php if($v["status"] == 1): ?>未确认<?php elseif($v["status"] == 2): ?>等待设计师确认<?php else: ?>完成<?php endif; ?>
                                </span>
                                <?php else: ?>
                                <span class="status"  id="query<?php echo ($v["indent"]); ?>" <?php if($_SESSION['type'] == 2): ?>width:120px;color:red;<?php else: ?>style="color:red;"<?php endif; ?>><?php if($v["status"] == 1): ?>购买未确认<?php elseif($v["status"] == 2): ?>设计师未确认<?php else: ?>完成<?php endif; ?></span><?php endif; ?>
                            <?php if($_SESSION['type'] == 2): ?><span class="op" style="width:100px;">  
                                    <span id="q<?php echo ($v["indent"]); ?>"  >
                                        <?php if($v['status'] == 1): ?><a href="javascript:;" onclick="ws('<?php echo ($v["indent"]); ?>')">确认</a><?php else: ?>确认<?php endif; ?>
                                    </span>
                                    <?php if($v['status'] != 3): ?><a href="javascript:;" onclick="dell('<?php echo ($v["id"]); ?>',0)" title="点击删除">删除</a><?php endif; ?>
                                </span>
                                <?php else: ?>
                                <span class="op" style="width:100px;">
                                    <span id="query1<?php echo ($v["indent"]); ?>">
                                        <?php if($v["status"] == 2): ?><a href="javascript:;" onclick="qu('<?php echo ($v["indent"]); ?>','<?php echo ($v["wwname"]); ?>','<?php echo ($na["$k"]["0"]["id"]); ?>',this)">确认</a><?php else: ?>确认<?php endif; ?>
                                    </span>
                                    <?php if($v['status'] != 3): ?><a href="javascript:;" onclick="dell('<?php echo ($v["id"]); ?>',1)" title="点击删除">删除</a><?php endif; ?>
                                </span><?php endif; ?>
                        </div><?php endforeach; endif; ?>
                    <div class="pages" style="margin:10px 0;"><?php echo ($page1); ?></div>
                </form>
                <?php else: ?>
                <div class="no-jilu">
                    暂无模板记录    
                </div><?php endif; ?>
        </div> 
    </div>
</div>               
</div>
        </div>